using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools._Configuration._LRSNetwork
{
    /// <summary>
    /// <para>Create LRS Network</para>
    /// <para>Creates an LRS Network in an ArcGIS Location Referencing linear referencing system (LRS).</para>
    /// <para>在 ArcGIS 位置参考线性参考系统 （LRS） 中创建 LRS 网络。</para>
    /// </summary>    
    [DisplayName("Create LRS Network")]
    public class CreateLRSNetwork : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateLRSNetwork()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_path">
        /// <para>Input Location</para>
        /// <para>The input workspace that will contain the new LRS Network. This workspace must be a geodatabase that contains a Location Referencing LRS. In addition to the top level of a geodatabase, a feature dataset is also supported as a valid path.</para>
        /// <para>将包含新 LRS 网络的输入工作空间。此工作空间必须是包含位置参照 LRS 的地理数据库。除了地理数据库的顶层之外，还支持将要素数据集作为有效路径。</para>
        /// </param>
        /// <param name="_lrs_name">
        /// <para>LRS Name</para>
        /// <para>The LRS to which the new LRS Network will be registered. The LRS must reside in the same geodatabase as the Input Location.</para>
        /// <para>新 LRS 网络将注册到的 LRS。LRS 必须与输入位置位于同一地理数据库中。</para>
        /// </param>
        /// <param name="_network_name">
        /// <para>LRS Network Name</para>
        /// <para>The name of the LRS Network that will be created, as well as the name of the feature class that will be created and registered with the LRS Network. The LRS Network name must be 26 or fewer characters and cannot contain special characters other than underscores.</para>
        /// <para>将创建的 LRS 网络的名称，以及将创建并注册到 LRS 网络的要素类的名称。LRS 网络名称必须为 26 个或更少的字符，并且不能包含下划线以外的特殊字符。</para>
        /// </param>
        /// <param name="_route_id_field">
        /// <para>Route ID Field</para>
        /// <para>The field in the output feature class that will be mapped as the LRS Network route ID. The field type is derived from the RouteId field of the centerline sequence table and must be either string or GUID.</para>
        /// <para>输出要素类中将映射为 LRS 网络路径 ID 的字段。字段类型派生自中心线序列表的 RouteId 字段，并且必须是字符串或 GUID。</para>
        /// </param>
        /// <param name="_route_name_field">
        /// <para>Route Name Field</para>
        /// <para>A string field in the output feature class that will be mapped as the LRS Network route name.</para>
        /// <para>输出要素类中的字符串字段，将映射为 LRS 网络路径名称。</para>
        /// </param>
        /// <param name="_from_date_field">
        /// <para>From Date Field</para>
        /// <para>A date field in the output feature class that will be mapped as the LRS Network from date.</para>
        /// <para>输出要素类中的日期字段，该字段将从日期起映射为 LRS 网络。</para>
        /// </param>
        /// <param name="_to_date_field">
        /// <para>To Date Field</para>
        /// <para>A date field in the output feature class that will be mapped as the LRS Network to date.</para>
        /// <para>输出要素类中的日期字段，该字段将映射为迄今为止的 LRS 网络。</para>
        /// </param>
        public CreateLRSNetwork(object _in_path, object _lrs_name, object _network_name, object _route_id_field, object _route_name_field, object _from_date_field, object _to_date_field)
        {
            this._in_path = _in_path;
            this._lrs_name = _lrs_name;
            this._network_name = _network_name;
            this._route_id_field = _route_id_field;
            this._route_name_field = _route_name_field;
            this._from_date_field = _from_date_field;
            this._to_date_field = _to_date_field;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Create LRS Network";

        public override string CallName => "locref.CreateLRSNetwork";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_path, _lrs_name, _network_name, _route_id_field, _route_name_field, _from_date_field, _to_date_field, _derive_from_line_network.GetGPValue(), _line_network_name, _include_fields_to_support_lines.GetGPValue(), _line_id_field, _line_name_field, _line_order_field, _measure_unit.GetGPValue(), _out_feature_class];

        /// <summary>
        /// <para>Input Location</para>
        /// <para>The input workspace that will contain the new LRS Network. This workspace must be a geodatabase that contains a Location Referencing LRS. In addition to the top level of a geodatabase, a feature dataset is also supported as a valid path.</para>
        /// <para>将包含新 LRS 网络的输入工作空间。此工作空间必须是包含位置参照 LRS 的地理数据库。除了地理数据库的顶层之外，还支持将要素数据集作为有效路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_path { get; set; }


        /// <summary>
        /// <para>LRS Name</para>
        /// <para>The LRS to which the new LRS Network will be registered. The LRS must reside in the same geodatabase as the Input Location.</para>
        /// <para>新 LRS 网络将注册到的 LRS。LRS 必须与输入位置位于同一地理数据库中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("LRS Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _lrs_name { get; set; }


        /// <summary>
        /// <para>LRS Network Name</para>
        /// <para>The name of the LRS Network that will be created, as well as the name of the feature class that will be created and registered with the LRS Network. The LRS Network name must be 26 or fewer characters and cannot contain special characters other than underscores.</para>
        /// <para>将创建的 LRS 网络的名称，以及将创建并注册到 LRS 网络的要素类的名称。LRS 网络名称必须为 26 个或更少的字符，并且不能包含下划线以外的特殊字符。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("LRS Network Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _network_name { get; set; }


        /// <summary>
        /// <para>Route ID Field</para>
        /// <para>The field in the output feature class that will be mapped as the LRS Network route ID. The field type is derived from the RouteId field of the centerline sequence table and must be either string or GUID.</para>
        /// <para>输出要素类中将映射为 LRS 网络路径 ID 的字段。字段类型派生自中心线序列表的 RouteId 字段，并且必须是字符串或 GUID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_id_field { get; set; }


        /// <summary>
        /// <para>Route Name Field</para>
        /// <para>A string field in the output feature class that will be mapped as the LRS Network route name.</para>
        /// <para>输出要素类中的字符串字段，将映射为 LRS 网络路径名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Route Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _route_name_field { get; set; }


        /// <summary>
        /// <para>From Date Field</para>
        /// <para>A date field in the output feature class that will be mapped as the LRS Network from date.</para>
        /// <para>输出要素类中的日期字段，该字段将从日期起映射为 LRS 网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _from_date_field { get; set; }


        /// <summary>
        /// <para>To Date Field</para>
        /// <para>A date field in the output feature class that will be mapped as the LRS Network to date.</para>
        /// <para>输出要素类中的日期字段，该字段将映射为迄今为止的 LRS 网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Date Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _to_date_field { get; set; }


        /// <summary>
        /// <para>Derive From Line Network</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the network will be configured as an LRS derived network.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The output will be an LRS derived network and a feature class to support the LRS derived network. The Line Network Name parameter must also be provided.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The output will not be an LRS derived network. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将网络配置为 LRS 派生网络。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 输出将为 LRS 派生网络和支持 LRS 派生网络的要素类。还必须提供线路网络名称参数。</bullet_item><para/>
        ///     <bullet_item>未选中 - 输出将不是 LRS 派生网络。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Derive From Line Network")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _derive_from_line_network_value _derive_from_line_network { get; set; } = _derive_from_line_network_value._false;

        public enum _derive_from_line_network_value
        {
            /// <summary>
            /// <para>DO_NOT_DERIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_DERIVE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>DERIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DERIVE")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Line Network Name</para>
        /// <para>The name of the LRS line network to which the output LRS derived network will be registered. The input LRS line network must reside in the same geodatabase workspace as the Line Network Name. This parameter is only used if the Derive From Line Network parameter is checked.</para>
        /// <para>输出 LRS 派生网络将注册到的 LRS 线路网络的名称。输入 LRS 线网络必须与线网络名称位于同一地理数据库工作空间中。仅当选中“从线网络派生”参数时，才使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Network Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _line_network_name { get; set; } = null;


        /// <summary>
        /// <para>Include Fields to Support Lines</para>
        /// <para><xdoc>
        ///   <para>Specifies whether fields that support lines will be added.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The output will be an LRS line network, and the output feature class will include fields that support lines. The Line ID Field, Line Name Field, and Line Order Field parameters must also be provided.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The output will not be an LRS line network. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否添加支持行的字段。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 输出将为 LRS 线网络，输出要素类将包括支持线的字段。还必须提供行 ID 字段、行名称字段和行订单字段参数。</bullet_item><para/>
        ///     <bullet_item>未选中 - 输出将不是 LRS 线路网络。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Fields to Support Lines")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _include_fields_to_support_lines_value _include_fields_to_support_lines { get; set; } = _include_fields_to_support_lines_value._false;

        public enum _include_fields_to_support_lines_value
        {
            /// <summary>
            /// <para>DO_NOT_INCLUDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_INCLUDE")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>INCLUDE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INCLUDE")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Line ID Field</para>
        /// <para>The field in the output feature class that will be mapped as the LRS Network line ID. This parameter is only used if the Include Fields to Support Lines parameter is checked. The field type is derived from the RouteId field of the centerline sequence table and will either be a string of exactly 38 characters or a GUID field type.</para>
        /// <para>输出要素类中将映射为 LRS 网络线 ID 的字段。仅当选中包括支持行的字段参数时，才使用此参数。字段类型派生自中心线序列表的 RouteId 字段，可以是正好包含 38 个字符的字符串，也可以是 GUID 字段类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _line_id_field { get; set; } = null;


        /// <summary>
        /// <para>Line Name Field</para>
        /// <para>A string field in the output feature class that will be mapped as the LRS Network line name. This parameter is only used if the Include Fields to Support Lines parameter is checked.</para>
        /// <para>输出要素类中的字符串字段，将映射为 LRS 网络线名称。仅当选中包括支持行的字段参数时，才使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Name Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _line_name_field { get; set; } = null;


        /// <summary>
        /// <para>Line Order Field</para>
        /// <para>The field in the output feature class that will be mapped as the LRS Network line order. This parameter is only used if the Include Fields to Support Lines parameter is checked. This will be a long integer field type.</para>
        /// <para>输出要素类中将映射为 LRS 网络线顺序的字段。仅当选中包括支持行的字段参数时，才使用此参数。这将是一个长整数字段类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Line Order Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _line_order_field { get; set; } = null;


        /// <summary>
        /// <para>Measure Unit</para>
        /// <para><xdoc>
        ///   <para>Specifies the unit of measure (m-unit) the LRS Network will use.
        ///   <bulletList>
        ///     <bullet_item>Miles—This is the default.  </bullet_item><para/>
        ///     <bullet_item>Inches  </bullet_item><para/>
        ///     <bullet_item>Feet  </bullet_item><para/>
        ///     <bullet_item>Yards  </bullet_item><para/>
        ///     <bullet_item>Nautical Miles  </bullet_item><para/>
        ///     <bullet_item>Millimeters  </bullet_item><para/>
        ///     <bullet_item>Centimeters  </bullet_item><para/>
        ///     <bullet_item>Meters  </bullet_item><para/>
        ///     <bullet_item>Kilometers  </bullet_item><para/>
        ///     <bullet_item>Decimeters  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定 LRS 网络将使用的度量单位 （m-unit）。
        ///   <bulletList>
        ///     <bullet_item>英里 - 这是默认设置。</bullet_item><para/>
        ///     <bullet_item>英寸</bullet_item><para/>
        ///     <bullet_item>脚</bullet_item><para/>
        ///     <bullet_item>码</bullet_item><para/>
        ///     <bullet_item>海里</bullet_item><para/>
        ///     <bullet_item>毫米</bullet_item><para/>
        ///     <bullet_item>厘米</bullet_item><para/>
        ///     <bullet_item>米</bullet_item><para/>
        ///     <bullet_item>公里</bullet_item><para/>
        ///     <bullet_item>分米</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Unit")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _measure_unit_value _measure_unit { get; set; } = _measure_unit_value._MILES;

        public enum _measure_unit_value
        {
            /// <summary>
            /// <para>Inches</para>
            /// <para>Inches  </para>
            /// <para>英寸</para>
            /// </summary>
            [Description("Inches")]
            [GPEnumValue("INCHES")]
            _INCHES,

            /// <summary>
            /// <para>Feet</para>
            /// <para>Feet  </para>
            /// <para>脚</para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("FEET")]
            _FEET,

            /// <summary>
            /// <para>Yards</para>
            /// <para>Yards  </para>
            /// <para>码</para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("YARDS")]
            _YARDS,

            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—This is the default.  </para>
            /// <para>英里 - 这是默认设置。</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("MILES")]
            _MILES,

            /// <summary>
            /// <para>Nautical miles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Nautical miles")]
            [GPEnumValue("NAUTICAL_MILES")]
            _NAUTICAL_MILES,

            /// <summary>
            /// <para>Millimeters</para>
            /// <para>Millimeters  </para>
            /// <para>毫米</para>
            /// </summary>
            [Description("Millimeters")]
            [GPEnumValue("MILLIMETERS")]
            _MILLIMETERS,

            /// <summary>
            /// <para>Centimeters</para>
            /// <para>Centimeters  </para>
            /// <para>厘米</para>
            /// </summary>
            [Description("Centimeters")]
            [GPEnumValue("CENTIMETERS")]
            _CENTIMETERS,

            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters  </para>
            /// <para>米</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("METERS")]
            _METERS,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers  </para>
            /// <para>公里</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("KILOMETERS")]
            _KILOMETERS,

            /// <summary>
            /// <para>Decimeters</para>
            /// <para>Decimeters  </para>
            /// <para>分米</para>
            /// </summary>
            [Description("Decimeters")]
            [GPEnumValue("DECIMETERS")]
            _DECIMETERS,

        }

        /// <summary>
        /// <para>Output Network Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public CreateLRSNetwork SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}